home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH5 / 5-2-5.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-05-17  |  2.6 KB  |  85 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMaximum 
  3.    Caption         =   "Maximum"
  4.    ClientHeight    =   2460
  5.    ClientLeft      =   2130
  6.    ClientTop       =   1635
  7.    ClientWidth     =   3135
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2460
  20.    ScaleWidth      =   3135
  21.    Begin VB.TextBox txtFirstNum 
  22.       Height          =   285
  23.       Left            =   1320
  24.       TabIndex        =   1
  25.       Top             =   240
  26.       Width           =   1335
  27.    End
  28.    Begin VB.PictureBox picResult 
  29.       Height          =   255
  30.       Left            =   120
  31.       ScaleHeight     =   195
  32.       ScaleWidth      =   2835
  33.       TabIndex        =   5
  34.       Top             =   2040
  35.       Width           =   2895
  36.    End
  37.    Begin VB.CommandButton cmdFindLarger 
  38.       Caption         =   "Find Larger Number"
  39.       Height          =   495
  40.       Left            =   120
  41.       TabIndex        =   4
  42.       Top             =   1320
  43.       Width           =   2895
  44.    End
  45.    Begin VB.TextBox txtSecondNum 
  46.       Height          =   285
  47.       Left            =   1320
  48.       TabIndex        =   3
  49.       Top             =   840
  50.       Width           =   1335
  51.    End
  52.    Begin VB.Label lblSecondNum 
  53.       Alignment       =   1  'Right Justify
  54.       Caption         =   "Second Number"
  55.       Height          =   495
  56.       Left            =   360
  57.       TabIndex        =   2
  58.       Top             =   720
  59.       Width           =   735
  60.    End
  61.    Begin VB.Label lblFirstNum 
  62.       Alignment       =   1  'Right Justify
  63.       Caption         =   "First Number"
  64.       Height          =   495
  65.       Left            =   360
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   735
  69.    End
  70. Attribute VB_Name = "frmMaximum"
  71. Attribute VB_GlobalNameSpace = False
  72. Attribute VB_Creatable = False
  73. Attribute VB_PredeclaredId = True
  74. Attribute VB_Exposed = False
  75. Private Sub cmdFindLarger_Click()
  76.   picResult.Cls
  77.   If Val(txtFirstNum.Text) > Val(txtSecondNum.Text) Then
  78.       picResult.Print "The larger number is"; txtFirstNum.Text
  79.     ElseIf Val(txtSecondNum.Text) > Val(txtFirstNum.Text) Then
  80.       picResult.Print "The larger number is "; txtSecondNum.Text
  81.     Else
  82.       picResult.Print "The two numbers are equal."
  83.   End If
  84. End Sub
  85.